#include<iostream>
using namespace std;
class ListNode {
public:
	ListNode(int val)
		:_val(val)
		,_next(nullptr)
		,_prev(nullptr)
	{}

	ListNode* _next;
	ListNode* _prev;
	int _val;
};
ListNode* LNCreate(int n) {
	int val;
	ListNode head(-1);
	ListNode* tail = &head;
	for (int i = 0; i < n; i++) {
		cin >> val;
		tail->_next = new ListNode(val);
		tail = tail->_next;
	}
	return head._next;
}
int main()
{
	ListNode* plist = LNCreate(5);
	return 0;
}